#ifndef MYMESH_H
#define MYMESH_H


/*include the base definition for the vertex */
#include <vcg/simplex/vertex/base.h>

/*include the base definition for the face */
#include <vcg/simplex/face/base.h>

/*include the base definition for the trimesh*/
#include <vcg/complex/trimesh/base.h>



using namespace vcg;
using namespace std;



class CVertex;
class CEdge;    // dummy prototype never used 
class CFace;   

class CVFUsedTypes : public vcg::UsedTypes<vcg::Use<CVertex>::AsVertexType, vcg::Use<CFace>::AsFaceType>{}; 
class CVEFUsedTypes : public vcg::UsedTypes<vcg::Use<CVertex>::AsVertexType, vcg::Use<CEdge>::AsEdgeType, vcg::Use<CFace>::AsFaceType>{}; 

/* define a  vertex passing the attributes you want it to have. Each attributes has its own class.
Check vcg/simplex/vertexplus/component.h to find out the existing attributes. Note: then you could 
also personalized attributes */
class CVertex : public Vertex< CVFUsedTypes, vertex::Coord3f, vertex::BitFlags,  vertex::Normal3f, vcg::vertex::Curvaturef, vcg::vertex::CurvatureDirf, vcg::vertex::VFAdj >{};
 
/*same as for the vertes */ 
class CFace   : public Face< CVEFUsedTypes, face::VertexRef, face::Normal3f, face::BitFlags , face::Color4b, face::FFAdj, face::Qualityf, face::VFAdj > {};

/*the mesh is a container of vertices and a container of faces */ 
class CMesh   : public vcg::tri::TriMesh< vector<CVertex>, vector<CFace> > {
public: 
  void FlipX();
  void ColorQ(float scale);
  void ColorByQ(int q);
  void ResetQ();
  bool Load(char *fn);
  bool Save(char *fn);
  void Draw(int drawMode);
  void Equilaterize(int nIte);
  void Compact(); // removes unused vertices and garbage collects deleted faces
};

#endif // MYMESH_H
